Skip to content

Conversation

@bhirsz
Copy link
Member

@bhirsz bhirsz commented Jan 6, 2026

Refactored the codebase to improve code organization and maintainability. The main changes involve:

Code reorganization: Moved ConfigManager and GitIgnoreResolver classes from config.py to a new dedicated file config_manager.py
Version handling consolidation: Created new version_handling.py module to centralize version-related logic and constants
SourceFile introduction: Added new SourceFile dataclass to bundle file path, configuration, and model together
Variables module: Moved VariableMatches class to a new parsing/variables.py module for better code structure
Import cleanup: Removed unused imports and reorganized imports across multiple files
Test updates: Added semi-automatic trigger for performance tests - by adding 'performance' label performance tests will execute.

The SourceFile will be used in the upcoming refactors - for example to retain source lines. I did not want to include this refactor in this PR since it's already touching multiple different modules.

Upcoming features requires as to refactor some of our core modules. They are now more OOP friendly and some of the duplicated code from tool merging is now removed as well.
@bhirsz bhirsz force-pushed the feat/refactor_source_handling branch 3 times, most recently from d8e74d1 to 9dfb69d Compare January 6, 2026 17:33
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Performance Report

Version Project traversal Linting (print+cache) Linting (print+no cache) Linting (no print+cache) Linting (no print+no cache) Linting (large file with print) Linting (large file without print) Formatting
7.3.0 0.389s (3.52%) 2.771s (-2.21%) 4.497s (-2.22%) 0.552s (-1.47%) 2.733s (-2.2%) 23.698s (0.72%) 6.728s (-2.18%) 0.523s (-3.91%)
7.2.0 0.376s (-3.35%) 2.833s (-39.21%) 4.599s (-27.21%) 0.560s (-1.06%) 2.795s (-1.15%) 23.529s (-20.28%) 6.877s (-1.5%) 0.544s (0.13%)
7.1.0 0.389s (-0.54%) 4.661s 6.318s (21.3%) 0.566s 2.827s (17.19%) 29.515s (23.04%) 6.982s (4.15%) 0.543s (2.21%)
7.0.0 0.391s (0.95%) - 5.209s (-0.49%) - 2.412s (0.96%) 23.988s (-1.85%) 6.704s (-1.41%) 0.531s (-1.47%)
6.13.0 0.387s (-92.42%) - 5.234s - 2.389s 24.440s 6.800s 0.539s
6.9.0 5.110s - - - - - - -

@bhirsz bhirsz removed the performance label Jan 7, 2026
@bhirsz bhirsz force-pushed the feat/refactor_source_handling branch from 9dfb69d to e30e76c Compare January 7, 2026 12:57
@bhirsz bhirsz merged commit 0e7f04e into main Jan 7, 2026
12 checks passed
@bhirsz bhirsz deleted the feat/refactor_source_handling branch January 7, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants